\(\int \frac {x^2 (a+b \log (c x^n))}{(d+e x)^4} \, dx\) [56]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 79 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\frac {b d n}{6 e^3 (d+e x)^2}-\frac {2 b n}{3 e^3 (d+e x)}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac {b n \log (d+e x)}{3 d e^3} \]

[Out]

1/6*b*d*n/e^3/(e*x+d)^2-2/3*b*n/e^3/(e*x+d)+1/3*x^3*(a+b*ln(c*x^n))/d/(e*x+d)^3-1/3*b*n*ln(e*x+d)/d/e^3

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2373, 45} \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac {2 b n}{3 e^3 (d+e x)}+\frac {b d n}{6 e^3 (d+e x)^2}-\frac {b n \log (d+e x)}{3 d e^3} \]

[In]

Int[(x^2*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

(b*d*n)/(6*e^3*(d + e*x)^2) - (2*b*n)/(3*e^3*(d + e*x)) + (x^3*(a + b*Log[c*x^n]))/(3*d*(d + e*x)^3) - (b*n*Lo
g[d + e*x])/(3*d*e^3)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2373

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp
[(f*x)^(m + 1)*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/(d*f*(m + 1))), x] - Dist[b*(n/(d*(m + 1))), Int[(f*x)^
m*(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[m + r*(q + 1) + 1, 0] && NeQ[
m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac {(b n) \int \frac {x^2}{(d+e x)^3} \, dx}{3 d} \\ & = \frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac {(b n) \int \left (\frac {d^2}{e^2 (d+e x)^3}-\frac {2 d}{e^2 (d+e x)^2}+\frac {1}{e^2 (d+e x)}\right ) \, dx}{3 d} \\ & = \frac {b d n}{6 e^3 (d+e x)^2}-\frac {2 b n}{3 e^3 (d+e x)}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 d (d+e x)^3}-\frac {b n \log (d+e x)}{3 d e^3} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(172\) vs. \(2(79)=158\).

Time = 0.08 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.18 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {a d^2}{3 e^3 (d+e x)^3}+\frac {a d}{e^3 (d+e x)^2}+\frac {b d n}{6 e^3 (d+e x)^2}-\frac {a}{e^3 (d+e x)}-\frac {2 b n}{3 e^3 (d+e x)}+\frac {b n \log (x)}{3 d e^3}-\frac {b d^2 \log \left (c x^n\right )}{3 e^3 (d+e x)^3}+\frac {b d \log \left (c x^n\right )}{e^3 (d+e x)^2}-\frac {b \log \left (c x^n\right )}{e^3 (d+e x)}-\frac {b n \log (d+e x)}{3 d e^3} \]

[In]

Integrate[(x^2*(a + b*Log[c*x^n]))/(d + e*x)^4,x]

[Out]

-1/3*(a*d^2)/(e^3*(d + e*x)^3) + (a*d)/(e^3*(d + e*x)^2) + (b*d*n)/(6*e^3*(d + e*x)^2) - a/(e^3*(d + e*x)) - (
2*b*n)/(3*e^3*(d + e*x)) + (b*n*Log[x])/(3*d*e^3) - (b*d^2*Log[c*x^n])/(3*e^3*(d + e*x)^3) + (b*d*Log[c*x^n])/
(e^3*(d + e*x)^2) - (b*Log[c*x^n])/(e^3*(d + e*x)) - (b*n*Log[d + e*x])/(3*d*e^3)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(164\) vs. \(2(71)=142\).

Time = 0.51 (sec) , antiderivative size = 165, normalized size of antiderivative = 2.09

method result size
parallelrisch \(\frac {-2 \ln \left (e x +d \right ) x^{3} b \,e^{3} n^{2}-6 \ln \left (e x +d \right ) x^{2} b d \,e^{2} n^{2}+2 x^{3} \ln \left (c \,x^{n}\right ) b \,e^{3} n -6 \ln \left (e x +d \right ) x b \,d^{2} e \,n^{2}-4 x^{2} b d \,e^{2} n^{2}-2 \ln \left (e x +d \right ) b \,d^{3} n^{2}-6 x^{2} a d \,e^{2} n -7 x b \,d^{2} e \,n^{2}-6 x a \,d^{2} e n -3 b \,d^{3} n^{2}-2 a \,d^{3} n}{6 n d \,e^{3} \left (e x +d \right )^{3}}\) \(165\)
risch \(-\frac {b \left (3 e^{2} x^{2}+3 d e x +d^{2}\right ) \ln \left (x^{n}\right )}{3 \left (e x +d \right )^{3} e^{3}}-\frac {-6 \ln \left (-x \right ) b d \,e^{2} n \,x^{2}-6 \ln \left (-x \right ) b \,d^{2} e n x -3 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )-3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) e x +3 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+3 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} e x +3 i \pi b \,d^{2} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2} e x -2 \ln \left (-x \right ) b \,e^{3} n \,x^{3}-i \pi b \,d^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )+2 a \,d^{3}+2 d^{3} b \ln \left (c \right )+6 \ln \left (e x +d \right ) b \,d^{2} e n x -3 i \pi b \,d^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3} e x -3 i \pi b d \,e^{2} x^{2} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+3 b \,d^{3} n -i \pi b \,d^{3} \operatorname {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (-x \right ) b \,d^{3} n +2 \ln \left (e x +d \right ) b \,d^{3} n +6 a d \,e^{2} x^{2}+6 a \,d^{2} e x +6 \ln \left (c \right ) b d \,e^{2} x^{2}+6 \ln \left (c \right ) b \,d^{2} e x +2 \ln \left (e x +d \right ) b \,e^{3} n \,x^{3}+6 \ln \left (e x +d \right ) b d \,e^{2} n \,x^{2}+7 b \,d^{2} e n x +4 b d \,e^{2} n \,x^{2}+i \pi b \,d^{3} \operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b \,d^{3} \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{6 d \,e^{3} \left (e x +d \right )^{3}}\) \(553\)

[In]

int(x^2*(a+b*ln(c*x^n))/(e*x+d)^4,x,method=_RETURNVERBOSE)

[Out]

1/6*(-2*ln(e*x+d)*x^3*b*e^3*n^2-6*ln(e*x+d)*x^2*b*d*e^2*n^2+2*x^3*ln(c*x^n)*b*e^3*n-6*ln(e*x+d)*x*b*d^2*e*n^2-
4*x^2*b*d*e^2*n^2-2*ln(e*x+d)*b*d^3*n^2-6*x^2*a*d*e^2*n-7*x*b*d^2*e*n^2-6*x*a*d^2*e*n-3*b*d^3*n^2-2*a*d^3*n)/n
/d/e^3/(e*x+d)^3

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 178 vs. \(2 (71) = 142\).

Time = 0.30 (sec) , antiderivative size = 178, normalized size of antiderivative = 2.25 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\frac {2 \, b e^{3} n x^{3} \log \left (x\right ) - 3 \, b d^{3} n - 2 \, a d^{3} - 2 \, {\left (2 \, b d e^{2} n + 3 \, a d e^{2}\right )} x^{2} - {\left (7 \, b d^{2} e n + 6 \, a d^{2} e\right )} x - 2 \, {\left (b e^{3} n x^{3} + 3 \, b d e^{2} n x^{2} + 3 \, b d^{2} e n x + b d^{3} n\right )} \log \left (e x + d\right ) - 2 \, {\left (3 \, b d e^{2} x^{2} + 3 \, b d^{2} e x + b d^{3}\right )} \log \left (c\right )}{6 \, {\left (d e^{6} x^{3} + 3 \, d^{2} e^{5} x^{2} + 3 \, d^{3} e^{4} x + d^{4} e^{3}\right )}} \]

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="fricas")

[Out]

1/6*(2*b*e^3*n*x^3*log(x) - 3*b*d^3*n - 2*a*d^3 - 2*(2*b*d*e^2*n + 3*a*d*e^2)*x^2 - (7*b*d^2*e*n + 6*a*d^2*e)*
x - 2*(b*e^3*n*x^3 + 3*b*d*e^2*n*x^2 + 3*b*d^2*e*n*x + b*d^3*n)*log(e*x + d) - 2*(3*b*d*e^2*x^2 + 3*b*d^2*e*x
+ b*d^3)*log(c))/(d*e^6*x^3 + 3*d^2*e^5*x^2 + 3*d^3*e^4*x + d^4*e^3)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 677 vs. \(2 (71) = 142\).

Time = 5.38 (sec) , antiderivative size = 677, normalized size of antiderivative = 8.57 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=\begin {cases} \tilde {\infty } \left (- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}\right ) & \text {for}\: d = 0 \wedge e = 0 \\\frac {\frac {a x^{3}}{3} - \frac {b n x^{3}}{9} + \frac {b x^{3} \log {\left (c x^{n} \right )}}{3}}{d^{4}} & \text {for}\: e = 0 \\\frac {- \frac {a}{x} - \frac {b n}{x} - \frac {b \log {\left (c x^{n} \right )}}{x}}{e^{4}} & \text {for}\: d = 0 \\- \frac {2 a d^{3}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {6 a d^{2} e x}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {6 a d e^{2} x^{2}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {2 b d^{3} n \log {\left (\frac {d}{e} + x \right )}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {3 b d^{3} n}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {6 b d^{2} e n x \log {\left (\frac {d}{e} + x \right )}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {7 b d^{2} e n x}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {6 b d e^{2} n x^{2} \log {\left (\frac {d}{e} + x \right )}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {4 b d e^{2} n x^{2}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} - \frac {2 b e^{3} n x^{3} \log {\left (\frac {d}{e} + x \right )}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} + \frac {2 b e^{3} x^{3} \log {\left (c x^{n} \right )}}{6 d^{4} e^{3} + 18 d^{3} e^{4} x + 18 d^{2} e^{5} x^{2} + 6 d e^{6} x^{3}} & \text {otherwise} \end {cases} \]

[In]

integrate(x**2*(a+b*ln(c*x**n))/(e*x+d)**4,x)

[Out]

Piecewise((zoo*(-a/x - b*n/x - b*log(c*x**n)/x), Eq(d, 0) & Eq(e, 0)), ((a*x**3/3 - b*n*x**3/9 + b*x**3*log(c*
x**n)/3)/d**4, Eq(e, 0)), ((-a/x - b*n/x - b*log(c*x**n)/x)/e**4, Eq(d, 0)), (-2*a*d**3/(6*d**4*e**3 + 18*d**3
*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3) - 6*a*d**2*e*x/(6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2
+ 6*d*e**6*x**3) - 6*a*d*e**2*x**2/(6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3) - 2*b*d*
*3*n*log(d/e + x)/(6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3) - 3*b*d**3*n/(6*d**4*e**3
 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3) - 6*b*d**2*e*n*x*log(d/e + x)/(6*d**4*e**3 + 18*d**3*e*
*4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3) - 7*b*d**2*e*n*x/(6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 +
 6*d*e**6*x**3) - 6*b*d*e**2*n*x**2*log(d/e + x)/(6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*
x**3) - 4*b*d*e**2*n*x**2/(6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3) - 2*b*e**3*n*x**3
*log(d/e + x)/(6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3) + 2*b*e**3*x**3*log(c*x**n)/(
6*d**4*e**3 + 18*d**3*e**4*x + 18*d**2*e**5*x**2 + 6*d*e**6*x**3), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 179 vs. \(2 (71) = 142\).

Time = 0.20 (sec) , antiderivative size = 179, normalized size of antiderivative = 2.27 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {1}{6} \, b n {\left (\frac {4 \, e x + 3 \, d}{e^{5} x^{2} + 2 \, d e^{4} x + d^{2} e^{3}} + \frac {2 \, \log \left (e x + d\right )}{d e^{3}} - \frac {2 \, \log \left (x\right )}{d e^{3}}\right )} - \frac {{\left (3 \, e^{2} x^{2} + 3 \, d e x + d^{2}\right )} b \log \left (c x^{n}\right )}{3 \, {\left (e^{6} x^{3} + 3 \, d e^{5} x^{2} + 3 \, d^{2} e^{4} x + d^{3} e^{3}\right )}} - \frac {{\left (3 \, e^{2} x^{2} + 3 \, d e x + d^{2}\right )} a}{3 \, {\left (e^{6} x^{3} + 3 \, d e^{5} x^{2} + 3 \, d^{2} e^{4} x + d^{3} e^{3}\right )}} \]

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="maxima")

[Out]

-1/6*b*n*((4*e*x + 3*d)/(e^5*x^2 + 2*d*e^4*x + d^2*e^3) + 2*log(e*x + d)/(d*e^3) - 2*log(x)/(d*e^3)) - 1/3*(3*
e^2*x^2 + 3*d*e*x + d^2)*b*log(c*x^n)/(e^6*x^3 + 3*d*e^5*x^2 + 3*d^2*e^4*x + d^3*e^3) - 1/3*(3*e^2*x^2 + 3*d*e
*x + d^2)*a/(e^6*x^3 + 3*d*e^5*x^2 + 3*d^2*e^4*x + d^3*e^3)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (71) = 142\).

Time = 0.38 (sec) , antiderivative size = 202, normalized size of antiderivative = 2.56 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {{\left (3 \, b e^{2} n x^{2} + 3 \, b d e n x + b d^{2} n\right )} \log \left (x\right )}{3 \, {\left (e^{6} x^{3} + 3 \, d e^{5} x^{2} + 3 \, d^{2} e^{4} x + d^{3} e^{3}\right )}} - \frac {4 \, b e^{2} n x^{2} + 6 \, b e^{2} x^{2} \log \left (c\right ) + 7 \, b d e n x + 6 \, a e^{2} x^{2} + 6 \, b d e x \log \left (c\right ) + 3 \, b d^{2} n + 6 \, a d e x + 2 \, b d^{2} \log \left (c\right ) + 2 \, a d^{2}}{6 \, {\left (e^{6} x^{3} + 3 \, d e^{5} x^{2} + 3 \, d^{2} e^{4} x + d^{3} e^{3}\right )}} - \frac {b n \log \left (e x + d\right )}{3 \, d e^{3}} + \frac {b n \log \left (x\right )}{3 \, d e^{3}} \]

[In]

integrate(x^2*(a+b*log(c*x^n))/(e*x+d)^4,x, algorithm="giac")

[Out]

-1/3*(3*b*e^2*n*x^2 + 3*b*d*e*n*x + b*d^2*n)*log(x)/(e^6*x^3 + 3*d*e^5*x^2 + 3*d^2*e^4*x + d^3*e^3) - 1/6*(4*b
*e^2*n*x^2 + 6*b*e^2*x^2*log(c) + 7*b*d*e*n*x + 6*a*e^2*x^2 + 6*b*d*e*x*log(c) + 3*b*d^2*n + 6*a*d*e*x + 2*b*d
^2*log(c) + 2*a*d^2)/(e^6*x^3 + 3*d*e^5*x^2 + 3*d^2*e^4*x + d^3*e^3) - 1/3*b*n*log(e*x + d)/(d*e^3) + 1/3*b*n*
log(x)/(d*e^3)

Mupad [B] (verification not implemented)

Time = 0.78 (sec) , antiderivative size = 167, normalized size of antiderivative = 2.11 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{(d+e x)^4} \, dx=-\frac {x^2\,\left (3\,a\,e^2+2\,b\,e^2\,n\right )+a\,d^2+x\,\left (3\,a\,d\,e+\frac {7\,b\,d\,e\,n}{2}\right )+\frac {3\,b\,d^2\,n}{2}}{3\,d^3\,e^3+9\,d^2\,e^4\,x+9\,d\,e^5\,x^2+3\,e^6\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d^2}{3\,e^3}+\frac {b\,x^2}{e}+\frac {b\,d\,x}{e^2}\right )}{d^3+3\,d^2\,e\,x+3\,d\,e^2\,x^2+e^3\,x^3}-\frac {2\,b\,n\,\mathrm {atanh}\left (\frac {2\,e\,x}{d}+1\right )}{3\,d\,e^3} \]

[In]

int((x^2*(a + b*log(c*x^n)))/(d + e*x)^4,x)

[Out]

- (x^2*(3*a*e^2 + 2*b*e^2*n) + a*d^2 + x*(3*a*d*e + (7*b*d*e*n)/2) + (3*b*d^2*n)/2)/(3*d^3*e^3 + 3*e^6*x^3 + 9
*d^2*e^4*x + 9*d*e^5*x^2) - (log(c*x^n)*((b*d^2)/(3*e^3) + (b*x^2)/e + (b*d*x)/e^2))/(d^3 + e^3*x^3 + 3*d*e^2*
x^2 + 3*d^2*e*x) - (2*b*n*atanh((2*e*x)/d + 1))/(3*d*e^3)